﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Utils.Logger
{
    /// <summary>
    /// Logger static class definition.
    /// </summary>
    public static class Logger
    {
        /// <summary>
        /// Common log handler.
        /// </summary>
        private static CommonLogger commonLogger = new CommonLogger();

        /// <summary>
        /// Log handler setter.
        /// </summary>
        public static CommonLogger LogHandler
        {
            set { commonLogger = value; }
        }

        /// <summary>
        /// Logs error.
        /// </summary>
        /// <param name="errorMessage">Error message.</param>
        public static void LogError(String errorMessage)
        {
            commonLogger.LogError(errorMessage);
        }

        /// <summary>
        /// Logs error.
        /// </summary>
        /// <param name="ex">Exception.</param>
        public static void LogError(Exception ex)
        {
            commonLogger.LogError(ex);
        }
    }
}
